﻿@using GSLMS.Entity
@using GSLMS.Entity.Enum
@model GSLMS.Entity.TB_APP_PROINFO
@{
    Layout = null;
    var UserEffList = ViewData["UserEffList"] as List<GSLMS.Entity.TB_SYS_EMP> ?? new List<GSLMS.Entity.TB_SYS_EMP>();
}
<div class="pageContent">
    <form method="post" action="RiskAudit/Director/DirectorDefault/GAssign?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent">
        @Html.HiddenFor(model => model.ID)
        <p>
            <label>
                客户名称：</label>
            @Html.ValueFor(model => model.CUSTNAME)
        </p>
        <p>
            <label>
                申请编号：</label>
            @Html.ValueFor(model => model.APPLYNO)
        </p>
        <p>
            <label>
                所属部门：</label>
            @Html.ValueFor(model => model.DEPNAME)
        </p>
        <p>
            <label>
                贷款产品：</label>
            @Html.ValueFor(model => model.PRODUCTNAME)
        </p>
        <p>
            <label>
                申请日期：</label>
            <span formatedate="yyyy-MM-dd">@Html.ValueFor(model => model.APPDATE)</span>
        </p>
        <p>
            <label>
                申请额度：</label>
            @Model.AMOUNT
            万元
        </p>
    </div>
    <div class="divider" />
    <table class="list nowrap" width="90%">
        <thead>
            <tr>
                <th>
                    选择
                </th>
                <th>
                    姓名/用户
                </th>
                <th>
                    所属部门
                </th>
                <th>
                    正在调查笔数
                </th>
                <th>
                    最新分配时间
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in UserEffList)
            {
                var setDisplay = false;
                setDisplay = (item.ISHOLIDAYS == 1 || item.ISLEAVE == 1 || ((int)ViewData["status"]) >= 31) ? true : false;
                
                <tr style="@(setDisplay ? "color:Gray;" : "")">
                    <td>
                        <input type="radio" name="FlowUser" value="@item.USERNAME" checked="@(Model.AduAssign != null && Model.AduAssign.FLOWUSER == item.USERNAME)" @(setDisplay ? "disabled" : "") />
                    </td>
                    <td>
                        @item.EMPNAME/@item.USERNAME
                    </td>
                    <td>@item.OrgName
                    </td>
                    <td align="center">@item.SurveyingCount
                    </td>
                    <td>
                        @item.LastAssignTime.ToString("yyyy-MM-dd HH:mm:ss").Replace("0001-01-01 00:00:00", "")
                    </td>
                </tr>
            }
        </tbody>
    </table>
    @if (((int)ViewData["status"]) >= 31)
    {

    }
    else
    {
        @Html.Partial("FormButtonBar")
    }
    </form>
</div>
